from rest_framework.viewsets import ReadOnlyModelViewSet

# Create your views here.
from book import models, serializers, pagination


class BookInfoViewSet(ReadOnlyModelViewSet):
    """
    list:
    返回图书列表数据

    retrieve:
    返回图书详情数据
    """

    queryset = models.BookInfo.objects.filter(is_delete=False)
    serializer_class = serializers.BookListSerializer
    pagination_class = pagination.BookListPagination
